Chris Pollett > Old Classes >
CS185c

( Print View )

Student Corner:
  [Grades Sec3]

  [Submit Sec3]

  [Class Sign Up Sec3]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HWs and Quizzes:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Quizzes]  [Project]

Practice Exams:
  [Mid]  [Final]

                           












CS185c Fall 2010Practice Midterm

Everyone is expected to know what we've talked about for each of the three languages discussed in this course: Java, Objective-C, and C-sharp. Questions about how to get a phone to do something though can be answered for any of the platforms we've considered. To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes at least three times. Second and third time try to see how much you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

1. What is the difference between an emulator and a simulator?

2. Briefly explain how retain, release, auto-release work in Objective-C.

3. Give code snippets which, for one of the three devices we've considered this semester, make an app that has a single button which when clicked brings up an alert with "Hello World" on it.

4. Give at least two different ways to handle auto-rotation on the device of your choice. For each method, your explanation should also give short code snippets.

5. Give the SQL code needed to create an Sqlite database Stuff, with a table Person with columns first name, last name, and age, then give the SQL to insert a couple rows into this table.

6. In C#, what is a partial class? What is Linq? What is type inference? If we put an object in a using clause what does it say about the type of the object?

7. For the device of your choice amongst those covered this semester, say how a phone app has access to its filesystem. Give an example with code of opening a file writing to it closing the file. Then opening the file reading from it and closing it.

8. What is a Java annotation? What is the purpose of the @Override annotation?

9. For the device of your choice amongst those covered this semester, explain with code how to make a view in which a web pages can be displayed.

10. What is REST? For the platform of you choice described with code how to access a REST service on this device.